//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.spring.schedule_system.dengxiaojiao.util;


import cn.hutool.core.util.IdUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;

public class LyIdUtils implements InitializingBean {
    private static final Logger log = LoggerFactory.getLogger(LyIdUtils.class);
    private static UidGenerator uidgenerator;
    @Autowired
    private UidGenerator uidgeneratorTemp;

    public LyIdUtils() {
    }

    public static String genId() {
        try {
            return String.valueOf(uidgenerator.getUID());
        } catch (Exception var1) {
            log.error("genId fail", var1);
            return IdUtil.simpleUUID();
        }
    }

    public static long genNumId() {
        return uidgenerator.getUID();
    }

    public void afterPropertiesSet() throws Exception {
        uidgenerator = this.uidgeneratorTemp;
    }
}
